// Copyright (c) Microsoft Corporation.  All rights reserved.
#pragma once
#include "afxwin.h"
// CAutoButton
// Holding the button will cause the control to continously send out button events
class CAutoButton :
    public CButton

{
public:
    CAutoButton(void);
    ~CAutoButton(void);

private:
    afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
    afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
    afx_msg void OnTimer(UINT_PTR nIDEvent);
    DECLARE_MESSAGE_MAP()

    static const UINT_PTR m_timerID;
    static const UINT m_timerElapse;
    // when button is pressed down, skip "m_timerSkip" = 4 timer counts,
    // then start sending button click commands
    static const UINT m_timerSkip;
    UINT m_timerCount;
};
